package com.raising.sc.service.controller;

import com.raising.sc.service.HelloClientInterface;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/hi")
public class HiController {

    @Autowired
    HelloClientInterface helloClient;

//    @ResponseStatus(HttpStatus.OK)
//    @GetMapping
    @RequestMapping(method = RequestMethod.GET, value = "/hello")
    public String find(@RequestParam("name") String name) {
        // TODO：只是演示Feign调用的方法
        return "Hi," + helloClient.findStudentByName(name);
    }

}